﻿namespace Devonline.AspNetCore;

/// <summary>
/// http request 基础分页查询请求参数
/// </summary>
public class PagedQueryRequest
{
    public PagedQueryRequest()
    {
        PageIndex = AppSettings.UNIT_ONE;
        PageSize = AppSettings.UNIT_TEN;
    }

    /// <summary>
    /// 当前页码
    /// </summary>
    public int PageIndex { get; set; }
    /// <summary>
    /// 页大小
    /// </summary>
    public int PageSize { get; set; }
    /// <summary>
    /// 查询条件
    /// </summary>
    public string? Filter { get; set; }
    /// <summary>
    /// 排序条件
    /// </summary>
    public string? OrderBy { get; set; }
}

/// <summary>
/// 包含时间范围条件的分页查询请求
/// </summary>
public class TimeRangePagedQueryRequest : PagedQueryRequest
{
    public DateTime? StartTime { get; set; }
    public DateTime? EndTime { get; set; }
}